package com.link2room.rodimus.factory;

import com.link2room.common.exception.SysException;
import com.link2room.common.util.SpringUtil;
import com.link2room.rodimus.constant.DrawConstant;
import com.link2room.rodimus.service.IAfterDrawHandleService;

import static com.link2room.enums.exception.RodimusSysExceptionEnum.DRAW_ERROR;


/**
 * Created by LN on 2017/10/24
 */
public class AfterDrawHandlerFactory {
    public static IAfterDrawHandleService getAfterDrawHandleService(String prizeType){
        if(DrawConstant.PrizeType.redpack.equals(prizeType)){
            return (IAfterDrawHandleService) SpringUtil.getBean("redpackAfterDrawHandleService");
        }else if(DrawConstant.PrizeType.pmsCoupon.equals(prizeType)){
            return (IAfterDrawHandleService) SpringUtil.getBean("pmsCouponAfterDrawHandleService");
        }else if(DrawConstant.PrizeType.pmsPackage.equals(prizeType)){
            return (IAfterDrawHandleService) SpringUtil.getBean("packageAfterDrawHandleService");
        }else {
            return null;
        }

    }
}
